| Conditions | 2 |
| Total Lines | 15 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { |
||
| 45 | |||
| 46 | @Post(':id') |
||
| 47 | public async post( |
||
| 48 | @Param() idDto: IdDTO, |
||
| 49 | @Body() dto: TaskDTO, |
||
| 50 | @Res() res: Response |
||
| 51 | ) { |
||
| 52 | const { name } = dto; |
||
| 53 | |||
| 54 | try { |
||
| 55 | await this.commandBus.execute(new UpdateTaskCommand(idDto.id, name)); |
||
| 56 | |||
| 57 | res.redirect(303, this.resolver.resolve('crm_tasks_list')); |
||
| 58 | } catch (e) { |
||
| 59 | throw new BadRequestException(e.message); |
||
| 60 | } |
||
| 63 |